The present invention relates to the rendering of polymorphic image data in graphical user interface elements and more particularly, to the atomic manipulation and rendering of a collection of a desired number of polymorphic images as a single composite image.
In typical graphical user interfaces, several user interface elements exist to assist users in utilizing system operations. Included in these elements are menus, buttons, and lists. Most modern computer operating systems provide a set of system services that software developers can call to create such user interface elements. The MacOS Toolbox is the part of the MacOS operating system that provides these services for software intended to be deployed on Apple Macintosh systems, or compatibles.
The user interface elements typically display text strings, icons or other types of images to convey information to the user. Typically, the system services that implement these user interface elements allow only textual data by default. These services support other visual data formats only through extensibility hooks. To create these extensibility hooks and utilize the other visual data formats typically requires much effort on the part of software developers.
The original MacOS Toolbox provides this extensibility through the use of definition functions. For example, it implements standard definition functions for menus (MDEF=0), controls (CDEF=0), and lists (LDEF=0). These standard definition functions are capable of displaying only textual data. Software developers who wish to display other kinds of data in these elements, such as displaying a color palette in a menu, or an icon in a button must replace the standard definition function with their own implementations.
The programming interfaces for the definition functions for the various user interface elements are sufficiently different from each other that one custom definition function is normally incapable of being shared with different elements, such as drawing icons in both a button and a list. Software developers normally write a control definition function for the button, and a separate list definition function for the list, although a custom definition function was intended to be the same in each. The duplication of these definitions creates a larger code requirement for the system.
Accordingly, a need exists for a more direct and flexible system for associating customized types of visual data in user interface elements. The present invention addresses such a need.
The present invention provides system and method aspects for providing polymorphic image data for images in a graphical user interface on a computer system. In a system aspect, the system includes an operating system, and an imaging object structure, the imaging object structure included in the operating system and utilized to generate images in the graphical user interface. Additionally, the imaging object structure further comprises a subclass of imaging objects, the subclasses comprising singular imaging objects and composite imaging objects. The singular imaging objects further include, but are not limited to, text imaging objects, picture imaging objects, pattern imaging objects, and icon imaging objects. Additionally, the composite imaging objects generate composite images of a desired combination of singular images generated by the singular imaging objects. Further, the imaging object structure includes a SOM object structure.
In a method for providing polymorphic image data for image display on a graphical user interface, including user interface elements, in a computer system, the method includes retrieving image data, retrieving a desired imaging object, and creating an image reference with the image data for the desired imaging object. The method further includes associating the image reference with an element of the user interface, and displaying the desired image on the user interface. The creating of an image reference further includes creating an image reference of a singular type when the desired image is a singular image, and encapsulating the image data as the image reference for the desired image.
Alternatively, creating the image reference of a composite image when the desired image is a composite image further includes adding subimages for the desired image, setting a size of the desired image, creating new image references for each subimage of the desired image, encapsulating the image data for each subimage in the image reference, and specifying spatial characteristics of each of the subimages.
In a computer system aspect for providing polymorphic image data for elements in a graphical user interface, the computer system includes a display device for displaying the graphical user interface, an operating system, the operating system including an imaging object structure, and an application program, the application program for utilizing the imaging object structure to generate images in the graphical user interface.
With these and other aspects of the present invention, greater flexibility for development of unique items of text, icons, graphics, etc., in elements of a graphical user interface is achieved. Further, the use of an imaging object structure in accordance with the present invention provides greater opportunity for sharing developed items among the various elements in a less complicated manner and with reduced duplication of efforts. These and other advantage of the aspects of the present invention will be more fully understood in conjunction with the following detailed description and accompanying drawings.